//package org.myrabbitmqdemo.service;
//
//import org.springframework.amqp.rabbit.annotation.Exchange;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Service;
//
///**
// * @Date 2025/6/10 11:14
// * @Author guangang
// */
//@Service
//public class TopicExchangeWithQueueService {
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue("f-queue"),
//            exchange = @Exchange(value = "federation", type = "direct"),
//            key = "ff"
//    ))
//    public void myDirectClassic0(String message) {
//        System.out.println("接收到federation消息：" + message);
//    }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue("my.classic2"),
//            exchange = @Exchange(value = "my.topic", type = "topic"),
//            key = "my.topic.classic"
//    ))
//    public void myDirectClassic(String message) {
//        System.out.println("接收到classic消息：" + message);
//    }
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue("my.quorum2"),
//            exchange = @Exchange(value = "my.topic", type = "topic"),
//            key = "my.topic.quorum"
//    ))
//    public void myDirectQuorum(String message) {
//        System.out.println("接收到quorum消息：" + message);
//    }
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue("my.stream2"),
//            exchange = @Exchange(name = "my.topic", type = "topic"),
//            key = "my.topic.stream"
//    ))
//    public void myDirectStream(String message) {
//        System.out.println("接收到stream消息：" + message);
//    }
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(value = "my.stream22", durable = "true"),
//            exchange = @Exchange(name = "my.topic", type = "topic"),
//            key = "my.topic.*"
//    ))
//    public void myDirectStream2(String message) {
//        System.out.println("接收到stream消息：" + message);
//    }
//
//}
